package com.example.demo.many2many;


import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class ManySender1 {
    @Autowired
    RabbitTemplate rabbitTemplate;

    public void send(String message) {
        ManyModle manyModle=new ManyModle();
        manyModle.setAge(10);
        manyModle.setName(message);
        rabbitTemplate.convertAndSend(Many2ManyQueueConfig.queueName, manyModle);
    }
}
